Skip to content

fix: dhis org_units and iaso org_units overlap#261

Merged
nazarfil merged 1 commit into
mainfrom
fix-iaso-widget-org-units
May 14, 2025
Merged

fix: dhis org_units and iaso org_units overlap#261
nazarfil merged 1 commit into
mainfrom
fix-iaso-widget-org-units

Conversation

@nazarfil

Copy link
Copy Markdown

Fixes ORG_UNITS overlap between DHIS2 and IASO

@nazarfil nazarfil requested a review from yolanfery May 14, 2025 03:59
@nazarfil nazarfil force-pushed the fix-iaso-widget-org-units branch 2 times, most recently from 3511cbd to 2ba7cc5 Compare May 14, 2025 04:02
@nazarfil nazarfil force-pushed the fix-iaso-widget-org-units branch from 2ba7cc5 to 76c720d Compare May 14, 2025 04:05
@nazarfil nazarfil merged commit 5b256f1 into main May 14, 2025
4 checks passed
@nazarfil nazarfil deleted the fix-iaso-widget-org-units branch May 14, 2025 04:07
"""Enum for IASO widgets."""

FORMS = "IASO_FORMS"
ORG_UNITS = "IASO_ORG_UNITS"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain, for future reference, why this was an issue ?

@nazarfil nazarfil May 14, 2025

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation is parsing the ast and in case of an attribute we do a string compare to map it to correct widget:

elif isinstance(keyword.value, ast.Attribute):

So it is either enforce typing with enums and then make sure they are unique, or string check on the prefix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants